angular.module('Controller')
.service('activeParam', ($rootScope, $http)->
    #type-1默认字段，2主要字段，3其他字段,4自定义字段
    #paramType-1输入框，2单选，3多选，4下拉框
    genParam:(type,key,name,paramType,options,required)->
        item={
            "type":type
            "paramKey": key,
            "paramName": name,
            "paramType": paramType,
            "options": options,
            "required":required
            "picked":if type==1 then true else false
        }
        return item
    getList:()->##性别状态
        list = []
        list.push this.genParam(1,'phone','手机号',1,false)
        list.push this.genParam(1,'name','姓名',1,false)
        list.push this.genParam(1,'email','邮箱',1,false)

        list.push this.genParam(2,'nickname','昵称',1,false)
        list.push this.genParam(2,'wechat','微信',1,false)
        list.push this.genParam(2,'sex','性别',2,[{value:1,name:'男'},{value:0,name:'女'}])
        list.push this.genParam(2,'age','年龄',1,false)

        list.push this.genParam(3,'school','毕业学校',1,false)
        list.push this.genParam(3,'occupation','职业',1,false)
        list.push this.genParam(3,'hobby','爱好',1,false)
        list.push this.genParam(3,'character','性格',1,false)
        list.push this.genParam(3,'constellation','星座',1,false)
        list.push this.genParam(3,'birthday','生日',1,false)
        list.push this.genParam(3,'city','城市',1,false)

        list
    getDefault:()->
        list = []
        list.push this.genParam(1,'phone','手机号',1,false)
        list.push this.genParam(1,'name','姓名',1,false)
        list.push this.genParam(1,'email','邮箱',1,false)
        list

)